<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    p.bar {
      position: relative;
      width: 249px;
      height: 35px;
      border: 1px solid #ccc;
    }
    p.bar::after {
      content: '';
      position: absolute;
      top: 13px;
      right: 10px;
      width: 10px;
      height: 10px;
      border-left: 1px solid black;
      border-top: 1px solid black;
      transform: rotate(45deg);
      transition: all 0.3s;
    }
    p.bar:hover::after {
      transform: rotate(225deg);
    }
  </style>
  <body>
    <p class="bar"></p>
  </body>
</html>
